<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
</head>
<body>
  <div id="app">
      <input type="text" v-model="words" id ="inp">
      <button>搜索一下</button>
  </div>

<script src="../js/vue.js"></script>
<script>
 var app = new Vue({
        el: "#app",
        data: {
          words: "",
        },
        methods:{
          
        },
        computed:{
          
        },
        mounted(){
          //调用 原生方法  获取输入框 焦点
          document.querySelector("#inp").focus();
        }
      });

</script>

</body>
</html>